package com.sws.orderMS.pojo;

import java.util.List;

public class Client extends User {

	private ShoppingCart myShoppingCart;
	private List<Order> myOrder;
	private PaymentMethod wallet;
		
	public Client() {
	}
	
	public Client(long id, String name, String username,
			String password, String email, String phone,
			PaymentMethod wallet, String address, 
			String note, int statusId) {
		this.id = id;
		this.name = name;
		this.username = username;
		this.password = password;
		this.email = email;
		this.phone = phone;
		this.wallet = wallet;
		this.address = address;
		this.note = note;
		this.currentStatus = statusId;
	}
	
	public PaymentMethod getWallet() {
		return wallet;
	}

	public void setWallet(PaymentMethod wallet) {
		this.wallet = wallet;
	}

	public List<Order> getMyOrder() {
		return myOrder;
	}
	
	public ShoppingCart getMyShoppingCart() {
		return myShoppingCart;
	}

	public void setMyShoppingCart(ShoppingCart myShoppingCart) {
		this.myShoppingCart = myShoppingCart;
	}

	public boolean equals(Object obj) {
		if (!(obj instanceof Client)) {
			return false;
		}
		Client client = (Client)obj;
		return this.id == client.getId();
	}
	
	public int hashCode() {
		String str = this.id + "";
		return str.hashCode();
	}
	
}
